"""mydjango URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,re_path
from django.views.static import serve
from myapp.views import myindex,MyView
from myapp.md_user import Register,MyCode,Login,wb_back,\
    Upload_File,ding_back,UserModify,Qiniu,UpdateUserImg,UserInfo
from myapp.examination import Ex_Register,Ex_Login,Ex_ding_back
from myapp.md_pics import InsertPics,Piclist
from myapp.md_goods import AddGoods,GoodsList,GoodItem,InsertTags,GetTags,UpdateTags,\
    UpdateGoods,GetOnLine,InsertComment,CommentList,UserList,UidFollow,GoodFollow,\
    GoodsClick,GoodRank,GoodsSearch
from myapp.kaos import Qiniu_kaos,UpdateUser,UserInfo1
from myapp.exam_Marth import AddGoods_Exam,GoodsList_Exam,InsertTags_Exam
from myapp.guanzhu import GoodFollow_Exam,UidFollow_Exam

urlpatterns = [
    #定义超链接路由
    re_path('^static/upload/(?P<path>.*)$',serve,{'document_root':'/static/upload/'}),
    path('',myindex),
    path('test/',MyView.as_view()),
    path("reg/",Register.as_view()),
    path("code/",MyCode.as_view()),
    path("login/",Login.as_view()),
    path("md_admin/weibo/",wb_back),
    path("md_admin/dingding/",ding_back),
    path("uploadfile/",Upload_File.as_view()),
    path("usermodify/",UserModify.as_view()),
    path("uptoken/",Qiniu.as_view()),
    path("updateimg_qiniu/",UpdateUserImg.as_view()),
    path("userinfo/",UserInfo.as_view()),

    #考试路由
    path("exreg/",Ex_Register.as_view()),
    path("exlogin/",Ex_Login.as_view()),
    path("qiniu_ks/",Qiniu_kaos.as_view()),
    path("updateuser/",UpdateUser.as_view()),
    path("userinfo1/",UserInfo1.as_view()),
    #3.27
    path("addgoods_exam/",AddGoods_Exam.as_view()),
    path("goodslist_exam/",GoodsList_Exam.as_view()),
    path("inserttags_exam/",InsertTags_Exam.as_view()),
    #4.2
    path("uidfollow_exam/",UidFollow_Exam.as_view()),
    path("goodfollow_exam/",GoodFollow_Exam.as_view()),


    #幻灯片图片路由
    path("insertpic/",InsertPics.as_view()),
    path("piclist/",Piclist.as_view()),

    #商品路由
    path("addgoods/",AddGoods.as_view()),
    path("goodslist/",GoodsList.as_view()),
    path("gooditem/",GoodItem.as_view()),
    path("updategood/",UpdateGoods.as_view()),
    path("inserttags/",InsertTags.as_view()),
    path("gettags/",GetTags.as_view()),
    path("updatetags/",UpdateTags.as_view()),
    #在线人数
    path("getonline/",GetOnLine.as_view()),
    path("insertcomment/",InsertComment.as_view()),
    path("commentlist/",CommentList.as_view()),
    path("commentlist/",CommentList.as_view()),
    path("userlist/",UserList.as_view()),
    path("uidfollow/",UidFollow.as_view()),
    path("goodfollow/",GoodFollow.as_view()),
    path("goodclick/",GoodsClick.as_view()),
    path("goodrank/",GoodRank.as_view()),
    path("goodssearch/",GoodsSearch.as_view()),

]
